#!/usr/bin/node
const fs=require('fs'),
      http=require('http'),
      pic=process.argv;

let data1=fs.readFileSync(pic[2]);
let data2=fs.readFileSync(pic[3]);
let data3=fs.readFileSync(pic[4]);

let uri1=data1.toString('base64');
let uri2=data2.toString('base64');
let uri3=data3.toString('base64');

let html=`<html><head><title>data uri</title></head><body><img src="data:image.bmp;base64,${uri1}"><img src="data:image.jpg;base64,${uri2}"><img src="data:image.png;base64,${uri3}"></body></html>`;

http.createServer((req,res)=>{
  res.end(html);

}).listen(8080);
